<template>
	<view>
		<!-- 顶部导航部分 -->
		<view class="top">
			<view class="bg"></view>
			<view class="title_header">
				<view class="jiantou" @click="back"></view>
				<text>评价管理</text>
			</view>
		
		
		<!-- 评价详情 -->
		<!-- <view  v-for="(item,index) in orderNumber"> -->
		 <view>
			<uni-card>
				<view class="dis">
					<!-- <text class="message">{{item.carOrder.userName}}</text> -->
					<text class="message">张女士</text>
					<!-- <text class="detail" @click="jump_detail(item.orderId)">查看详情</text> -->
					<text class="detail"  @click="jump_detail">查看详情</text>
				</view>
				<view class="hang">
					<view class="content color">
						<text>订单编号：</text>
						<!-- <text>{{item.carOrder.number}}</text> -->
						<text>2021010831213</text>
					</view>
					<view class="content">
						<view class="cord">
							<text>综合评分：</text>
							<!-- <text>{{item.commentScore}}分</text> -->
							<text>3分</text>
						</view>
						<!-- <uni-rate :readonly="true" size="15" :max="5" v-model="item.commentScore" @change="onChange" /> -->
						<uni-rate :readonly="true" size="15" :max="5"  @change="onChange" />
					</view>
					<view class="content">
						<text>评价时间：</text>
						<!-- <text>{{item.commentTime}}</text> -->
						<text>2023-03-12 11:02</text>
						
					</view>
				</view>	
			
			</uni-card>
		</view>		
		
		<view>
			<uni-card>
				<view class="dis">
					<!-- <text class="message">{{item.carOrder.userName}}</text> -->
					<text class="message">张女士</text>
					<!-- <text class="detail" @click="jump_detail(item.orderId)">查看详情</text> -->
					<text class="detail" @click="jump_detail">查看详情</text>
				</view>
				<view class="hang">
					<view class="content color">
						<text>订单编号：</text>
						<!-- <text>{{item.carOrder.number}}</text> -->
						<text>2021010831213</text>
					</view>
					<view class="content">
						<view class="cord">
							<text>综合评分：</text>
							<!-- <text>{{item.commentScore}}分</text> -->
							<text>3分</text>
						</view>
						<!-- <uni-rate :readonly="true" size="15" :max="5" v-model="item.commentScore" @change="onChange" /> -->
						<uni-rate :readonly="true" size="15" :max="5"  @change="onChange" />
					</view>
					<view class="content">
						<text>评价时间：</text>
						<!-- <text>{{item.commentTime}}</text> -->
						<text>2023-03-12 11:02</text>
						
					</view>
				</view>	
			
			</uni-card>
		</view>	
		
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				rateValue: 0,
				orderNumber:[],
			}
		},
		onLoad() {
			this.commentManage();
		},
		methods: {
			
			//页面接口数据请求
			commentManage(){
				uni.request({
					url:" http://localhost:8080/seller/commenManage/finished",
					header: {
					    'Authorization':'Bearer '+getApp().globalData.userInfo.token
					},
					success: (res) => {
						this.orderNumber = res.data.rows;
					},
					// success(res) {
					// 	console.log("评价管理页面数据:",res);
					// 	this.orderNumber = res.data.rows;
					// },
					fail(err){
						console.log(err);
					}
				})
			},
			
			//
			jump_detail(){
				uni.navigateTo({
					url:"/pages/finished_order/finished_order"
				})
			},
			
			
			onChange(e) {
				console.log('rate发生改变:' + JSON.stringify(e))
				// console.log(this.rateValue);
			},
			back(){
				uni.navigateBack({
					delta:1,
				});
			},
			//跳转订单详情页面
			jump_detail(id){
				uni.navigateTo({
					url:"/pages/finished_order/finished_order?id="+id
				})
			}
		}
	}
</script>

<style>
	/* 标题样式 */
	.top{
		width: 750rpx;
		height: 400rpx;
		background-color: #3785f6;
	}
	.bg{
		position: absolute;
		z-index: -1;
		background-color: #3785f6;
		width: 750rpx;
		height: 450rpx;
	}
	.title_header{
		display: flex;
		padding-top: 60rpx;
	}
	.title_header>text{
		font-size: 35rpx;
		color: white;
		margin-left: 255rpx;
	}
	.jiantou{
		border-bottom: 6rpx solid white;
		border-left: 6rpx solid white;
		width: 20rpx;
		height: 20rpx;
		margin-left: 20rpx;
		transform: rotate(45deg);
	}
	
	/* 详情标题 */
	.dis{
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 10rpx;
	}
	.message{
		color: black;
		font-size: 30rpx;
	}
	.detail{
		width: 145rpx;
		/* height: 45rpx; */
		border: 1rpx solid #156be7;
		text-align: center;
		color: white;
		background-color: #156be7;
		font-size: 25rpx;
		border-radius: 30rpx;
		padding-bottom: 3rpx;
	}
	
	.hang{
		line-height: 60rpx;
		/* border: 1rpx solid orchid; */
		margin-top: 23rpx;
		border-top: 3rpx solid #dedede;
		padding-top: 20rpx;
	}
	.content{
		height: 50rpx;
		/* border: 1rpx solid aquamarine; */
		margin-bottom: 15rpx;
		display: flex;
		align-items: center;
	}
	.color{
		color: #3785f6;
	}
	.cord{
		color: #464646;
		margin-right: 20rpx;
	}
	
</style>
